//
// CClipTrav.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CClipTrav {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CClipTrav(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CClipTrav obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CClipTrav(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CClipTrav() {
    this(nel3dJNI.new_CClipTrav(), true);
  }

  public void traverse() {
    nel3dJNI.CClipTrav_traverse(swigCPtr, this);
  }

  public void registerCluster(CCluster pCluster) {
    nel3dJNI.CClipTrav_registerCluster(swigCPtr, this, CCluster.getCPtr(pCluster), pCluster);
  }

  public void unregisterCluster(CCluster pCluster) {
    nel3dJNI.CClipTrav_unregisterCluster(swigCPtr, this, CCluster.getCPtr(pCluster), pCluster);
  }

  public void setQuadGridClipManager(CQuadGridClipManager mgr) {
    nel3dJNI.CClipTrav_setQuadGridClipManager(swigCPtr, this, CQuadGridClipManager.getCPtr(mgr), mgr);
  }

  public CQuadGridClipManager getQuadGridClipManager() {
    long cPtr = nel3dJNI.CClipTrav_getQuadGridClipManager(swigCPtr, this);
    return (cPtr == 0) ? null : new CQuadGridClipManager(cPtr, false);
  }

  public void addVisibleModel(CTransform model) {
    nel3dJNI.CClipTrav_addVisibleModel(swigCPtr, this, CTransform.getCPtr(model), model);
  }

  public void reserveVisibleList(long numModels) {
    nel3dJNI.CClipTrav_reserveVisibleList(swigCPtr, this, numModels);
  }

  public boolean fullSearch(SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t result, CVector pos) {
    return nel3dJNI.CClipTrav_fullSearch(swigCPtr, this, SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t.getCPtr(result), CVector.getCPtr(pos), pos);
  }

  public void setClusterVisibilityTracking(boolean track) {
    nel3dJNI.CClipTrav_setClusterVisibilityTracking(swigCPtr, this, track);
  }

  public boolean getClusterVisibilityTracking() {
    return nel3dJNI.CClipTrav_getClusterVisibilityTracking(swigCPtr, this);
  }

  public void addVisibleCluster(CCluster cluster) {
    nel3dJNI.CClipTrav_addVisibleCluster(swigCPtr, this, CCluster.getCPtr(cluster), cluster);
  }

  public SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t getVisibleClusters() {
    return new SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t(nel3dJNI.CClipTrav_getVisibleClusters(swigCPtr, this), false);
  }

  public void set_TrackClusterVisibility(boolean value) {
    nel3dJNI.CClipTrav__TrackClusterVisibility_set(swigCPtr, this, value);
  }

  public boolean get_TrackClusterVisibility() {
    return nel3dJNI.CClipTrav__TrackClusterVisibility_get(swigCPtr, this);
  }

  public void set_VisibleClusters(SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t value) {
    nel3dJNI.CClipTrav__VisibleClusters_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t.getCPtr(value));
  }

  public SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t get_VisibleClusters() {
    long cPtr = nel3dJNI.CClipTrav__VisibleClusters_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_NL3D__CCluster_p_t(cPtr, false);
  }

  public void setViewPyramid(SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t value) {
    nel3dJNI.CClipTrav_ViewPyramid_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t.getCPtr(value));
  }

  public SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t getViewPyramid() {
    long cPtr = nel3dJNI.CClipTrav_ViewPyramid_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t(cPtr, false);
  }

  public void setWorldFrustumPyramid(SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t value) {
    nel3dJNI.CClipTrav_WorldFrustumPyramid_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t.getCPtr(value));
  }

  public SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t getWorldFrustumPyramid() {
    long cPtr = nel3dJNI.CClipTrav_WorldFrustumPyramid_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t(cPtr, false);
  }

  public void setWorldPyramid(SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t value) {
    nel3dJNI.CClipTrav_WorldPyramid_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t.getCPtr(value));
  }

  public SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t getWorldPyramid() {
    long cPtr = nel3dJNI.CClipTrav_WorldPyramid_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t(cPtr, false);
  }

  public void setCurrentDate(long value) {
    nel3dJNI.CClipTrav_CurrentDate_set(swigCPtr, this, value);
  }

  public long getCurrentDate() {
    return nel3dJNI.CClipTrav_CurrentDate_get(swigCPtr, this);
  }

  public void setRootCluster(CCluster value) {
    nel3dJNI.CClipTrav_RootCluster_set(swigCPtr, this, CCluster.getCPtr(value), value);
  }

  public CCluster getRootCluster() {
    long cPtr = nel3dJNI.CClipTrav_RootCluster_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CCluster(cPtr, false);
  }

  public void setCamera(CCamera value) {
    nel3dJNI.CClipTrav_Camera_set(swigCPtr, this, CCamera.getCPtr(value), value);
  }

  public CCamera getCamera() {
    long cPtr = nel3dJNI.CClipTrav_Camera_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CCamera(cPtr, false);
  }

  public void setAccel(SWIGTYPE_p_CQuadGridT_NL3D__CCluster_p_t value) {
    nel3dJNI.CClipTrav_Accel_set(swigCPtr, this, SWIGTYPE_p_CQuadGridT_NL3D__CCluster_p_t.getCPtr(value));
  }

  public SWIGTYPE_p_CQuadGridT_NL3D__CCluster_p_t getAccel() {
    long cPtr = nel3dJNI.CClipTrav_Accel_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_CQuadGridT_NL3D__CCluster_p_t(cPtr, false);
  }

  public void setForceNoFrustumClip(boolean value) {
    nel3dJNI.CClipTrav_ForceNoFrustumClip_set(swigCPtr, this, value);
  }

  public boolean getForceNoFrustumClip() {
    return nel3dJNI.CClipTrav_ForceNoFrustumClip_get(swigCPtr, this);
  }

}
